package com.sg.controller.bff;

import com.sg.service.biz.bff.BatchService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "Batch", tags = {"Batch"})
@RestController
// @RequestMapping("/oms/batch/")
public class BatchController {

    @Autowired
    BatchService batchService;

    /**
     * B1-1发布组织批次（管理）
     */
    @PostMapping("/oms/mgt/batch/releaseOrgBatch")
    @ApiOperation(value = "B1-1发布组织批次（管理）", response = OkrResult.class)
    public OkrResult<BffReleaseOrgBatchRespDto> releaseOrgBatch(@RequestBody(required = false) @Validated BffReleaseOrgBatchReqDto reqDTO) {
        return OkrResult.success(batchService.releaseOrgBatch(reqDTO));
    }

    /**
     * B1-1删除组织批次（管理）
     */
    @PostMapping("/oms/mgt/batch/deleteOrgBatch")
    @ApiOperation(value = "B1-1删除组织批次（管理）", response = OkrResult.class)
    public OkrResult<BffDeleteOrgBatchRespDto> deleteOrgBatch(@RequestBody(required = false) @Validated BffDeleteOrgBatchReqDto reqDTO) {
        return OkrResult.success(batchService.deleteOrgBatch(reqDTO));
    }

    /**
     * B1-1查询岗位类型批次列表（当前+未来，操作按钮判断）
     * gen by moon at 10/23/2022, 2:36:41 PM
     */
    @PostMapping("/oms/mgt/batch/queryStationTypeBatchFteList")
    @ApiOperation(value = "B1-1查询岗位类型批次列表（当前+未来，操作按钮判断）", response = OkrResult.class)
    public OkrResult<BffQueryStationTypeBatchFteListRespDto> queryStationTypeBatchFteList(@RequestBody(required = false) @Validated BffQueryStationTypeBatchFteListReqDto reqDTO) {
        return OkrResult.success(batchService.queryStationTypeBatchFteList(reqDTO));
    }

    /**
     * B1-1查询历史岗位类型批次列表（管理）
     * gen by moon at 8/10/2022, 3:38:01 AM
     */
    @PostMapping("/oms/mgt/batch/queryStationTypeBatchList")
    @ApiOperation(value = "B1-1查询历史岗位类型批次列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryStationTypeBatchListRespDto> queryStationTypeBatchList(@RequestBody(required = false) @Validated BffQueryStationTypeBatchListReqDto reqDTO) {
        return OkrResult.success(batchService.queryStationTypeBatchList(reqDTO));
    }

    /**
     * B1-3查询组织批次列表（当前+未来，操作按钮判断）
     * gen by moon at 8/18/2022, 10:21:50 PM
     */
    @PostMapping("/oms/mgt/batch/queryOrgBatchList")
    @ApiOperation(value = "B1-3查询组织批次列表（当前+未来，操作按钮判断）", response = OkrResult.class)
    public OkrResult<BffQueryOrgBatchListRespDto> queryOrgBatchList(@RequestBody(required = false) @Validated BffQueryOrgBatchListReqDto reqDTO) {
        return OkrResult.success(batchService.queryOrgBatchList(reqDTO));
    }

    /**
     * B1-1查询历史组织批次列表（管理）
     * gen by moon at 8/23/2022, 1:11:37 AM
     */
    @PostMapping("/oms/mgt/batch/queryOrgBatchHisList")
    @ApiOperation(value = "B1-1查询历史组织批次列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryOrgBatchHisListRespDto> queryOrgBatchHisList(@RequestBody(required = false) @Validated BffQueryOrgBatchHisListReqDto reqDTO) {
        return OkrResult.success(batchService.queryOrgBatchHisList(reqDTO));
    }

    /**
     * B1-1新增组织批次（管理）
     * gen by moon at 8/31/2022, 1:47:33 AM
     */
    @PostMapping("/oms/mgt/batch/addOrgBatch")
    @ApiOperation(value = "B1-1新增组织批次（管理）", response = OkrResult.class)
    public OkrResult<BffAddOrgBatchRespDto> addOrgBatch(@RequestBody(required = false) @Validated BffAddOrgBatchReqDto reqDTO) {
        return OkrResult.success(batchService.addOrgBatch(reqDTO));
    }

    /**
     * B1-3发布岗位类型批次(管理）
     * gen by moon at 8/10/2022, 3:37:59 AM
     */
    @PostMapping("/oms/batch/releaseStationTypeBatch")
    @ApiOperation(value = "B1-3发布岗位类型批次(管理）", response = OkrResult.class)
    public OkrResult<BffReleaseStationTypeBatchRespDto> releaseStationTypeBatch(@RequestBody(required = false) @Validated BffReleaseStationTypeBatchReqDto reqDTO) {
        return OkrResult.success(batchService.releaseStationTypeBatch(reqDTO));
    }

    /**
     * B1执行组织架构批次发布(管理)
     * gen by moon at 9/10/2022, 5:29:36 PM
     */
    @PostMapping("/oms/mgt/batch/implementOrgBatchPublish")
    @ApiOperation(value = "B1执行组织架构批次发布(管理)", response = OkrResult.class)
    public OkrResult<BffImplementOrgBatchPublishRespDto> implementOrgBatchPublish(@RequestBody(required = false) @Validated BffImplementOrgBatchPublishReqDto reqDTO) {
        return OkrResult.success(batchService.implementOrgBatchPublish(reqDTO));
    }

    /**
     * B1执行组织架构撤销批次(管理)
     * gen by moon at 9/10/2022, 5:29:38 PM
     */
    @PostMapping("/oms/mgt/batch/implementOrgDeleteBatch")
    @ApiOperation(value = "B1执行组织架构撤销批次(管理)", response = OkrResult.class)
    public OkrResult<BffImplementOrgDeleteBatchRespDto> implementOrgDeleteBatch(@RequestBody(required = false) @Validated BffImplementOrgDeleteBatchReqDto reqDTO) {
        return OkrResult.success(batchService.implementOrgDeleteBatch(reqDTO));
    }

    /**
     * B1-1查询组织架构成员管理判断
     * gen by moon at 8/19/2022, 8:28:41 PM
     */
    @PostMapping("/oms/batch/queryOrgStructureMgtSituationDetail")
    @ApiOperation(value = "B1-1查询组织架构成员管理判断", response = OkrResult.class)
    public OkrResult<BffQueryOrgStructureMgtSituationDetailRespDto> queryOrgStructureMgtSituationDetail(@RequestBody(required = false) @Validated BffQueryOrgStructureMgtSituationDetailReqDto reqDTO) {
        return OkrResult.success(batchService.queryOrgStructureMgtSituationDetail(reqDTO));
    }

    /**
     * B1-1判断组织架构进入管理可用
     * gen by moon at 9/10/2022, 5:29:40 PM
     */
    @PostMapping("/oms/batch/judgeOrgStructureMgtUsable")
    @ApiOperation(value = "B1-1判断组织架构进入管理可用", response = OkrResult.class)
    public OkrResult<BffJudgeOrgStructureMgtUsableRespDto> judgeOrgStructureMgtUsable(@RequestBody(required = false) @Validated BffJudgeOrgStructureMgtUsableReqDto reqDTO) {
        return OkrResult.success(batchService.judgeOrgStructureMgtUsable(reqDTO));
    }

    /**
     * B3-13查询评价模板当前及历史批次列表
     * gen by moon at 9/7/2022, 1:49:10 AM
     */
    @PostMapping("/oms/batch/queryEvaTempBatchHisAndPresentList")
    @ApiOperation(value = "B3-13查询评价模板当前及历史批次列表", response = OkrResult.class)
    public OkrResult<BffQueryEvaTempBatchHisAndPresentListRespDto> queryEvaTempBatchHisAndPresentList(@RequestBody(required = false) @Validated BffQueryEvaTempBatchHisAndPresentListReqDto reqDTO) {
        return OkrResult.success(batchService.queryEvaTempBatchHisAndPresentList(reqDTO));
    }

    /**
     * B3-3查询高层批次下进入管理判断(管理)
     * gen by moon at 2/6/2023, 12:35:35 AM
     */
    @PostMapping("/oms/mgt/batch/queryEvaTempMgtSituationDetail")
    @ApiOperation(value = "B3-3查询高层批次下进入管理判断(管理)", response = OkrResult.class)
    public OkrResult<BffQueryEvaTempMgtSituationDetailRespDto> queryEvaTempMgtSituationDetail(@RequestBody(required = false) @Validated BffQueryEvaTempMgtSituationDetailReqDto reqDTO) {
        return OkrResult.success(batchService.queryEvaTempMgtSituationDetail(reqDTO));
    }

    /**
     * B3-3查询中层批次下进入管理判断(管理)
     * gen by moon at 2/6/2023, 12:35:37 AM
     */
    @PostMapping("/oms/mgt/batch/queryMidMgtSituationDetail")
    @ApiOperation(value = "B3-3查询中层批次下进入管理判断(管理)", response = OkrResult.class)
    public OkrResult<BffQueryMidMgtSituationDetailRespDto> queryMidMgtSituationDetail(@RequestBody(required = false) @Validated BffQueryMidMgtSituationDetailReqDto reqDTO) {
        return OkrResult.success(batchService.queryMidMgtSituationDetail(reqDTO));
    }

    /**
     * B3-3查询基层批次下进入管理判断(管理)
     * gen by moon at 2/6/2023, 12:35:39 AM
     */
    @PostMapping("/oms/mgt/batch/queryBasicMgtSituationDetail")
    @ApiOperation(value = "B3-3查询基层批次下进入管理判断(管理)", response = OkrResult.class)
    public OkrResult<BffQueryBasicMgtSituationDetailRespDto> queryBasicMgtSituationDetail(@RequestBody(required = false) @Validated BffQueryBasicMgtSituationDetailReqDto reqDTO) {
        return OkrResult.success(batchService.queryBasicMgtSituationDetail(reqDTO));
    }

    /**
     * B3执行评价模板批次发布(管理)
     * gen by moon at 9/17/2022, 1:05:20 AM
     */
    @PostMapping("/oms/mgt/batch/implementPlanEvaBatchPublish")
    @ApiOperation(value = "B3执行评价模板批次发布(管理)", response = OkrResult.class)
    public OkrResult<BffImplementPlanEvaBatchPublishRespDto> implementPlanEvaBatchPublish(@RequestBody(required = false) @Validated BffImplementPlanEvaBatchPublishReqDto reqDTO) {
        return OkrResult.success(batchService.implementPlanEvaBatchPublish(reqDTO));
    }

    /**
     * B3执行评价模板撤销批次(管理)
     * gen by moon at 9/17/2022, 1:05:23 AM
     */
    @PostMapping("/oms/mgt/batch/implementPlanEvaDeleteBatch")
    @ApiOperation(value = "B3执行评价模板撤销批次(管理)", response = OkrResult.class)
    public OkrResult<BffImplementPlanEvaDeleteBatchRespDto> implementPlanEvaDeleteBatch(@RequestBody(required = false) @Validated BffImplementPlanEvaDeleteBatchReqDto reqDTO) {
        return OkrResult.success(batchService.implementPlanEvaDeleteBatch(reqDTO));
    }

    /**
     * B3-3执行中层撤销批次(管理)
     * gen by moon at 9/19/2022, 11:16:22 PM
     */
    @PostMapping("/oms/mgt/batch/implementMidDeleteBatch")
    @ApiOperation(value = "B3-3执行中层撤销批次(管理)", response = OkrResult.class)
    public OkrResult<BffImplementMidDeleteBatchRespDto> implementMidDeleteBatch(@RequestBody(required = false) @Validated BffImplementMidDeleteBatchReqDto reqDTO) {
        return OkrResult.success(batchService.implementMidDeleteBatch(reqDTO));
    }

    /**
     * B3发布中层未来批次(管理)
     * gen by moon at 9/19/2022, 11:15:58 PM
     */
    @PostMapping("/oms/mgt/batch/releaseMidBatchFte")
    @ApiOperation(value = "B3发布中层未来批次(管理)", response = OkrResult.class)
    public OkrResult<BffReleaseMidBatchFteRespDto> releaseMidBatchFte(@RequestBody(required = false) @Validated BffReleaseMidBatchFteReqDto reqDTO) {
        return OkrResult.success(batchService.releaseMidBatchFte(reqDTO));
    }

    /**
     * B3-3查中层批次使用锁定状态(管理)
     * gen by moon at 9/13/2022, 12:59:35 AM
     */
    @PostMapping("/oms/mgt/batch/queryMidBatchRelatedSetDetail")
    @ApiOperation(value = "B3-3查中层批次使用锁定状态(管理)", response = OkrResult.class)
    public OkrResult<BffQueryMidBatchRelatedSetDetailRespDto> queryMidBatchRelatedSetDetail(@RequestBody(required = false) @Validated BffQueryMidBatchRelatedSetDetailReqDto reqDTO) {
        return OkrResult.success(batchService.queryMidBatchRelatedSetDetail(reqDTO));
    }

    /**
     * B3-3查高层模板使用状态(管理)
     * gen by moon at 9/13/2022, 12:59:37 AM
     */
    @PostMapping("/oms/mgt/batch/queryTopBatchRelatedSetDetail")
    @ApiOperation(value = "B3-3查高层模板使用状态(管理)", response = OkrResult.class)
    public OkrResult<BffQueryTopBatchRelatedSetDetailRespDto> queryTopBatchRelatedSetDetail(@RequestBody(required = false) @Validated BffQueryTopBatchRelatedSetDetailReqDto reqDTO) {
        return OkrResult.success(batchService.queryTopBatchRelatedSetDetail(reqDTO));
    }

    /**
     * B3发布基层未来批次(管理)
     * gen by moon at 9/19/2022, 11:16:20 PM
     */
    @PostMapping("/oms/mgt/batch/releaseBasicBatchFte")
    @ApiOperation(value = "B3发布基层未来批次(管理)", response = OkrResult.class)
    public OkrResult<BffReleaseBasicBatchFteRespDto> releaseBasicBatchFte(@RequestBody(required = false) @Validated BffReleaseBasicBatchFteReqDto reqDTO) {
        return OkrResult.success(batchService.releaseBasicBatchFte(reqDTO));
    }

    /**
     * B3新增高层未来批次(管理)
     * gen by moon at 9/22/2022, 3:13:34 AM
     */
    @PostMapping("/oms/mgt/batch/addTopBatchFte")
    @ApiOperation(value = "B3新增高层未来批次(管理)", response = OkrResult.class)
    public OkrResult<BffAddTopBatchFteRespDto> addTopBatchFte(@RequestBody(required = false) @Validated BffAddTopBatchFteReqDto reqDTO) {
        return OkrResult.success(batchService.addTopBatchFte(reqDTO));
    }

    /**
     * B3-3新增中层未来批次(管理)
     * gen by moon at 9/23/2022, 11:38:41 PM
     */
    @PostMapping("/oms/mgt/batch/addMidBatchFte")
    @ApiOperation(value = "B3-3新增中层未来批次(管理)", response = OkrResult.class)
    public OkrResult<BffAddMidBatchFteRespDto> addMidBatchFte(@RequestBody(required = false) @Validated BffAddMidBatchFteReqDto reqDTO) {
        return OkrResult.success(batchService.addMidBatchFte(reqDTO));
    }

    /**
     * B3-3新增基层未来批次(管理)
     * gen by moon at 9/22/2022, 3:13:38 AM
     */
    @PostMapping("/oms/mgt/batch/addBasicBatchFte")
    @ApiOperation(value = "B3-3新增基层未来批次(管理)", response = OkrResult.class)
    public OkrResult<BffAddBasicBatchFteRespDto> addBasicBatchFte(@RequestBody(required = false) @Validated BffAddBasicBatchFteReqDto reqDTO) {
        return OkrResult.success(batchService.addBasicBatchFte(reqDTO));
    }

    /**
     * B3-3执行基层撤销批次(管理)
     * gen by moon at 9/19/2022, 11:16:24 PM
     */
    @PostMapping("/oms/mgt/batch/implementBasicDeleteBatch")
    @ApiOperation(value = "B3-3执行基层撤销批次(管理)", response = OkrResult.class)
    public OkrResult<BffImplementBasicDeleteBatchRespDto> implementBasicDeleteBatch(@RequestBody(required = false) @Validated BffImplementBasicDeleteBatchReqDto reqDTO) {
        return OkrResult.success(batchService.implementBasicDeleteBatch(reqDTO));
    }

    /**
     * B3-3暂停模板使用(管理)
     * gen by moon at 10/15/2022, 10:26:46 PM
     */
    @PostMapping("/oms/mgt/batch/updateSuspendedTempUseState")
    @ApiOperation(value = "B3-3暂停模板使用(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateSuspendedTempUseStateRespDto> updateSuspendedTempUseState(@RequestBody(required = false) @Validated BffUpdateSuspendedTempUseStateReqDto reqDTO) {
        return OkrResult.success(batchService.updateSuspendedTempUseState(reqDTO));
    }

    /**
     * B3-3恢复模板使用(管理)
     * gen by moon at 10/15/2022, 10:26:48 PM
     */
    @PostMapping("/oms/mgt/batch/updateRestoreTempUseState")
    @ApiOperation(value = "B3-3恢复模板使用(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateRestoreTempUseStateRespDto> updateRestoreTempUseState(@RequestBody(required = false) @Validated BffUpdateRestoreTempUseStateReqDto reqDTO) {
        return OkrResult.success(batchService.updateRestoreTempUseState(reqDTO));
    }

    /**
     * B3-3查评价模板发布进度情况(管理)
     * gen by moon at 10/8/2022, 3:10:20 AM
     */
    @PostMapping("/oms/mgt/batch/queryEvaTempPublishRateDetail")
    @ApiOperation(value = "B3-3查评价模板发布进度情况(管理)", response = OkrResult.class)
    public OkrResult<BffQueryEvaTempPublishRateDetailRespDto> queryEvaTempPublishRateDetail(@RequestBody(required = false) @Validated BffQueryEvaTempPublishRateDetailReqDto reqDTO) {
        return OkrResult.success(batchService.queryEvaTempPublishRateDetail(reqDTO));
    }

    /**
     * B3-3查询基层批次使用锁定状态
     * gen by moon at 9/14/2022, 11:46:58 PM
     */
    @PostMapping("/oms/batch/queryBasicBatchSetDetail")
    @ApiOperation(value = "B3-3查询基层批次使用锁定状态", response = OkrResult.class)
    public OkrResult<BffQueryBasicBatchSetDetailRespDto> queryBasicBatchSetDetail(@RequestBody(required = false) @Validated BffQueryBasicBatchSetDetailReqDto reqDTO) {
        return OkrResult.success(batchService.queryBasicBatchSetDetail(reqDTO));
    }

    /**
     * B3查高中基层下发回退进度(管理)
     * gen by moon at 5/1/2023, 10:21:01 PM
     */
    @PostMapping("/oms/mgt/batch/queryTopMidBasicIssueOrRollbackProgressDetail")
    @ApiOperation(value = "B3查高中基层下发回退进度(管理)", response = OkrResult.class)
    public OkrResult<BffQueryTopMidBasicIssueOrRollbackProgressDetailRespDto> queryTopMidBasicIssueOrRollbackProgressDetail(@RequestBody(required = false) @Validated BffQueryTopMidBasicIssueOrRollbackProgressDetailReqDto reqDTO) {
        return OkrResult.success(batchService.queryTopMidBasicIssueOrRollbackProgressDetail(reqDTO));
    }

}
